package com.kl.forum.api;

import com.kl.forum.service.HomePageService;
import com.kl.forum.util.ResultInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api("首页模块")
@RestController
@RequestMapping("/homepage")
public class HomePageControllerAPI {
    @Autowired
    private HomePageService homePageService;


    /**
     * 搜索
     * @return
     */
    @ApiOperation(value = "搜索",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "keyWord", value = "关键词", required = true, dataType = "String"),
            @ApiImplicitParam(name = "type", value = "类型 1文章 2视频 3帖子 4用户 5健康号 ", required = true, dataType = "String"),
            @ApiImplicitParam(name = "pageNum", value = "页数", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "userId", value = "用户", required = false, dataType = "Long"),


    })
    @RequestMapping(value = "/search",method= RequestMethod.GET)
    public ResultInfo search(String keyWord,String type,Integer pageNum,Integer pageSize,@RequestParam(value = "userId",required = false) Integer userId){
        return  homePageService.search(keyWord,type,pageNum,pageSize,userId);

    }


    /**
     * 展示栏目
     * @param userId
     * @return
     */
    @ApiOperation(value = "首页展示栏目",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户Id", required = false, dataType = "Long"),
    })
    @RequestMapping(value = "/showColumn",method= RequestMethod.GET)
    public ResultInfo showColumn( @RequestParam(value = "userId",required = false)Integer userId){
        return  homePageService.showColumn(userId);
    }

    /**
     * 编辑栏目
     * @param userId
     * @return
     */
    @ApiOperation(value = "编辑栏目",notes="")
    @RequestMapping(value = "/editColumn",method= RequestMethod.POST)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "columnData", value = "用户菜单数据", required = true,   dataType = "String" ),
            @ApiImplicitParam(name = "columnDataHide", value = "用户菜单数据", required = true, dataType = "String"),
    })
    public ResultInfo editColumn(Integer userId,  String columnData,  String columnDataHide){
        return  homePageService.editColumn(userId,columnData,columnDataHide);
    }
    /**
     * 展示Banner
     * @return
     */
    @ApiOperation(value = "展示Banner",notes="")
    @RequestMapping(value = "/showBanner",method= RequestMethod.GET)
    public ResultInfo showBanner(){
        return  homePageService.showBanner();
    }


    /**
     * 展示功能菜单
     * @return
     */
    @ApiOperation(value = "展示功能菜单",notes="")
    @RequestMapping(value = "/showFunction",method= RequestMethod.GET)
    public ResultInfo showFunction(){
        return   homePageService.showFunction();
    }
    /**更多
     * 展示功能 菜单
     * @return
     */
    @ApiOperation(value = "展示功能 菜单 更多",notes="")
    @RequestMapping(value = "/findAllFunction",method= RequestMethod.GET)
    public ResultInfo findAllFunction(){
        return   homePageService.findAllFunction();
    }

    /**
     * 知识专题
     * @return
     */
    @ApiOperation(value = "展示功能 TAG",notes="")
    @RequestMapping(value ="/showTag" ,method= RequestMethod.GET)
    public ResultInfo showTag(){
        return  homePageService.showTag();
    }

    /** 更多
     * 知识专题 tag all菜单
     * @return
     */
    @ApiOperation(value = "知识专题 tag all菜单",notes="")
    @RequestMapping(value ="/findTagAll",method= RequestMethod.GET )
    public ResultInfo findTagAll(){
        return  homePageService.findTagAll();
    }



    /**
     * 每日精选
     * @param pageNum
     * @param pageSize
     * @return
     */
    @ApiOperation(value = "每日精选的文章",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "adNum", value = "广告数量传3", required = true, dataType = "Long")

    })
    @RequestMapping(value = "/dailySelection",method= RequestMethod.GET)
    public ResultInfo  dailySelection(Integer pageNum,Integer pageSize,Integer adNum){
      return   homePageService.dailySelection(pageNum,pageSize,adNum);
    }


    /**
     * 通过栏目ID查看文章列表
     * @param columnId
     * @param pageNum
     * @param pageSize
     * @return
     */
    @ApiOperation(value = "通过栏目ID查看文章列表",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "columnId", value = "栏目Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "adNum", value = "广告数量3", required = true, dataType = "Long")

    })
    @RequestMapping(value = "findArticleByColumnId",method= RequestMethod.GET)
    public ResultInfo findArticleByColumnId(Integer columnId,Integer pageNum ,Integer pageSize,Integer adNum){
        return   homePageService.findArticleByColumnId(columnId,pageNum,pageSize,adNum);
    }



    /**
     * 文章详情
     * @param articleId
     * @param userId 用户id
     * @return
     */
    @ApiOperation(value = "文章详情",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "articleId", value = "文章Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "userId", value = "用户Id", required = false, dataType = "Long"),
    })
    @RequestMapping(value = "/articleDetail",method= RequestMethod.GET)
    public  ResultInfo articleDetail(Integer articleId,@RequestParam(value = "userId",required = false)Integer userId){
        return   homePageService.articleDetail(articleId,userId);
    }






    /**
     * 文章点赞
     * @param articleId
     * @param userId 点赞人ID
     * @return
     */
    @ApiOperation(value = "文章点赞",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "articleId", value = "文章Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/articleLight",method= RequestMethod.POST)
    public  ResultInfo articleLight(Integer articleId,Integer userId){
        return   homePageService.articleLight(articleId,userId);
    }

    /**
     * 文章取消点赞
     * @param articleId
     * @param userId 点赞人ID
     * @return
     */
    @ApiOperation(value = "文章取消点赞",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "articleId", value = "文章Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/articleDark",method= RequestMethod.POST)
    public  ResultInfo articleDark(Integer articleId,Integer userId){
        return   homePageService.articleDark(articleId,userId);
    }

    /**
     * 文章评论列表
     * @return  lightStatus 返回 用来判断 是否点赞过
     */
    @ApiOperation(value = "文章评论列表 按照时间查询",notes="lightStatus 1点赞过 0没有点赞过")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户Id", required = false, dataType = "Long"),
            @ApiImplicitParam(name = "articleId", value = "文章Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "sort", value = "排序条件 1时间正序 2时间倒叙 3点赞数倒叙", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/findArticleCommentBySort",method= RequestMethod.GET)
    public  ResultInfo findArticleCommentBySort(@RequestParam(value = "userId" ,required = false) Integer userId,Integer articleId,Integer pageNum ,Integer pageSize,String sort){
        return   homePageService.findArticleCommentBySort(userId,articleId,pageNum,pageSize,sort);
    }


    /**
     * 文章评论回复列表
     * @return
     */
    @ApiOperation(value = "文章评论回复列表(详情) ",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户Id", required = false, dataType = "Long"),
            @ApiImplicitParam(name = "commentId", value = "文章Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),

    })
    @RequestMapping(value = "/findCircleArticleCommentReplyList",method= RequestMethod.GET)
    public  ResultInfo findCircleArticleCommentReplyList(@RequestParam(value = "userId" ,required = false) Integer userId,Integer commentId,Integer pageNum ,Integer pageSize){
        return   homePageService.findCircleArticleCommentReplyList(userId,commentId,pageNum,pageSize);
    }




    /**
     * 用户文章评论增加
     * @param userId  用户ID
     * @param articleId  文章ID
     * @param content  内容
     * @return
     */
    @ApiOperation(value = "用户文章评论",notes="增加")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "articleId", value = "文章Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "content", value = "内容", required = true, dataType = "String"),
    })
    @RequestMapping(value = "/addArticleComment",method= RequestMethod.POST)
    public  ResultInfo addArticleComment(Integer userId,Integer articleId,String content){
        return   homePageService.addArticleComment(userId,articleId,content);

    }


    /**
     * 用户删除自己的评论 删除
     * @param
     * @param commentId
     * @return
     */
    @ApiOperation(value = "用户删除自己的评论",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "commentId", value = "评论Id", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/delArticleComment",method= RequestMethod.POST)
    public ResultInfo delArticleComment(Integer commentId){
        return   homePageService.delArticleComment(commentId);
    }

    /**
     * 文章评论点赞
     * @param userId
     * @param commentId
     * @return
     */
    @ApiOperation(value = "文章评论点赞",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "commentId", value = "评论Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/articleCommentLight",method= RequestMethod.POST)
    public  ResultInfo articleCommentLight(Integer commentId,Integer userId){
        return   homePageService.articleCommentLight(commentId,userId);
    }

    /**
     * 文章评论点灭
     * @param userId
     * @param commentId
     * @return
     */
    @ApiOperation(value = "文章评论点灭",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "commentId", value = "评论Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/articleCommentDark",method= RequestMethod.POST)
    public  ResultInfo articleCommentDark(Integer commentId,Integer userId){
        return   homePageService.articleCommentDark(commentId,userId);
    }





    /**
     * 用户文章回复增加
     * @param userId  用户ID
     * @param commentId  评论ID
     * @param content  内容
     * @return
     */
    @ApiOperation(value = "用户文章回复增加",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "userName", value = "用户姓名", required = true, dataType = "String"),
            @ApiImplicitParam(name = "commentId", value = "评论Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "content", value = "内容", required = true, dataType = "String"),
            @ApiImplicitParam(name = "articleId", value = "文章Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "commentName", value = "被评论人姓名", required = false, dataType = "String"),
            @ApiImplicitParam(name = "commentNameId", value = "被评论人ID", required = false, dataType = "Long"),

    })
    @RequestMapping(value = "/addArticleCommentReply",method= RequestMethod.POST)
    public  ResultInfo addArticleCommentReply(Integer userId,String userName,Integer commentId,String content,Integer articleId,@RequestParam(value = "commentName" ,required = false) String commentName,@RequestParam(value = "commentNameId" ,required = false)Integer commentNameId){
        return   homePageService.addArticleCommentReply(userId, userName,commentId,content,articleId,commentName,commentNameId);

    }


    /**
     * 用户删除自己回复的评论 删除
     * @param
     * @param replyId  评论ID
     * @return
     */
    @ApiOperation(value = "用户删除自己回复的评论",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "replyId", value = "回复Id", required = true, dataType = "Long"),

    })
    @RequestMapping(value = "/delArticleCommentReply",method= RequestMethod.POST)
    public ResultInfo delArticleCommentReply(Integer replyId){
        return   homePageService.delArticleCommentReply(replyId);

    }

    /**
     * 文章回复评论点赞
     * @param userId
     * @param replyId
     * @return
     */
    @ApiOperation(value = "文章回复评论点赞",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "replyId", value = "回复Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/articleCommentLightReply",method= RequestMethod.POST)
    public  ResultInfo articleCommentLightReply(Integer replyId,Integer userId){
        return   homePageService.articleCommentReplyLight(replyId,userId);
    }

    /**
     * 文章回复评论点灭
     * @param userId
     * @param replyId
     * @return
     */
    @ApiOperation(value = "文章回复评论点灭",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "replyId", value = "回复Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/articleCommentDarkReply",method= RequestMethod.POST)
    public  ResultInfo articleCommentDarkReply(Integer replyId,Integer userId){
        return   homePageService.articleCommentReplyDark(replyId,userId);
    }


    /**关注:
     * 有关注以及未关注
     * @return
     */
    @ApiOperation(value = "有关注以及未关注",notes="关注 模块 当前页")
    @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long")
    @RequestMapping(value = "/findHealthy",method= RequestMethod.POST)
    public ResultInfo findHealthy(Integer userId){
        return   homePageService.findHealthy(userId);
    }


    /**
     * 关注： 按照用户关注健康号显示文章
     * @param userId
     * @param pageNum
     * @param pageSize
     * @return
     */
    @ApiOperation(value = " 按照用户关注健康号显示文章",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageNum", value = "页数", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),

    })
    @RequestMapping(value = "findHealthyArticleByUserId",method= RequestMethod.GET)
    public ResultInfo findHealthyArticleByUserId(Integer userId,Integer pageNum ,Integer pageSize){
        return   homePageService.findHealthyArticleByUserId(userId,pageNum,pageSize);
    }

//    /**关注：
//     * 我的关注健康号列表
//     * @param userId
//     * @param pageNum
//     * @param pageSize
//     * @return
//     */
//    @ApiOperation(value = "我的关注健康号列表",notes=" ")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
//            @ApiImplicitParam(name = "pageNum", value = "页数", required = true, dataType = "Long"),
//            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),
//
//    })
//    @RequestMapping(value = "/findMyHealthyNumByUserId",method= RequestMethod.GET)
//    public  ResultInfo findMyHealthyNumByUserId(Integer userId,Integer pageNum ,Integer pageSize){
//        return   homePageService.findMyHealthyNumByUserId(userId,pageNum,pageSize);
//    }


    /**
     * 关注：
     * 健康号的文章列表
     * @param healthyId
     * @param pageNum
     * @param pageSize
     * @return
     */
    @ApiOperation(value = "健康号的文章列表",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "healthyId", value = "健康号Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageNum", value = "页数", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),

    })
    @RequestMapping(value = "findArticleByHealthyNumId",method= RequestMethod.GET)
    public  ResultInfo findArticleByHealthyNumId(Integer healthyId,Integer pageNum ,Integer pageSize){
        return   homePageService.findArticleByHealthyNumId(healthyId,pageNum,pageSize);

    }

    /**
     * 关注：
     * 去关注
     * @param userId
     * @param healthyId
     * @return
     */
    @ApiOperation(value = "去关注",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "healthyId", value = "健康号Id", required = true, dataType = "Long"),

    })
    @RequestMapping(value = "/addUserHealthy",method= RequestMethod.POST)
    public ResultInfo  addUserHealthy(Integer userId,Integer healthyId){
        return   homePageService.addUserHealthy(userId,healthyId);
    }

    /**
     * 关注：
     * 取消关注
     * @param userId
     * @param healthyId
     * @return
     */
    @ApiOperation(value = "取消关注",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "healthyId", value = "健康号Id", required = true, dataType = "Long"),

    })
    @RequestMapping(value = "/updateUserHealthy",method= RequestMethod.POST)
    public ResultInfo  updateUserHealthy(Integer userId,Integer healthyId){
        return   homePageService.updateUserHealthy(userId,healthyId);
    }

    /**
     * 健康号类型字典表菜单
     * @return
     */
    @ApiOperation(value = "健康号类型字典表菜单",notes=" ")
    @RequestMapping(value ="/findHealthyDic",method= RequestMethod.GET )
    public ResultInfo findHealthyDic(){
        return   homePageService.findHealthyDic();
    }

    /**
     * 通过类型寻找未关注健康号
     * @param type
     * @return
     */
    @ApiOperation(value = "通过类型寻找未关注健康号",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "type", value = "类型", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageNum", value = "页数", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/findHealthyNumByType",method= RequestMethod.GET)
   public  ResultInfo findHealthyNumByType(Integer type,Integer userId,Integer pageNum ,Integer pageSize){
       return   homePageService.findHealthyNumByType(type,userId,pageNum,pageSize);
   }

    /**
     * 健康号详情
     * @param healthyId
     * @return
     */
    @ApiOperation(value = "健康号详情",notes=" ")
    @ApiImplicitParam(name = "healthyId", value = "健康号Id", required = true, dataType = "Long")
    @RequestMapping(value = "/healthyNumDetail",method= RequestMethod.GET)
    public  ResultInfo healthyNumDetail(Integer healthyId){
        return   homePageService.healthyNumDetail(healthyId);
   }

    /**
     * 收藏 文章
     * @return
     */
    @ApiOperation(value = "收藏文章",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "articleId", value = "文章Id", required = true, dataType = "Long"),
    })
   @RequestMapping(value = "/addArticleCollect",method= RequestMethod.POST)
   public  ResultInfo addArticleCollect(Integer userId,Integer articleId){
       return   homePageService.addArticleCollect(userId,articleId);
   }

    /**
     * 取消收藏
     * @param userId
     * @param articleId
     * @return
     */
    @ApiOperation(value = "取消收藏",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "articleId", value = "文章Id", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/updateArticleCollect",method= RequestMethod.POST)
   public ResultInfo updateArticleCollect(Integer userId,Integer articleId){
       return   homePageService.updateArticleCollect(userId,articleId);
   }

//    /**
//     * 查找我的收藏  返回的重要参数
//     * @return
//     */
//    @ApiOperation(value = "查找我的收藏",notes="")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "userId", value = "用户Id", required = true, dataType = "Long"),
//            @ApiImplicitParam(name = "pageNum", value = "页数", required = true, dataType = "Long"),
//            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),
//    })
//    @RequestMapping(value = "/findArticleCollect",method= RequestMethod.GET)
//   public  ResultInfo findArticleCollect(Integer userId,Integer pageNum ,Integer pageSize){
//       return   homePageService.findArticleCollect(userId,pageNum,pageSize);
//   }

    /**
     * 根据tagId寻找百度百度的种类
     * @param tagId
     * @return
     */
    @ApiOperation(value = "根据tagId寻找百科的种类",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "tagId", value = "标签Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageNum", value = "页数", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/findKindByTagId",method = RequestMethod.GET)
   public  ResultInfo findKindByTagId(Integer tagId,Integer pageNum ,Integer pageSize){
        return   homePageService.findKindByTagId(tagId,pageNum,pageSize);
   }


    /**
     * 百科详情
     * @param id
     * @return
     */
    @ApiOperation(value = "百科详情",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "Id", required = true, dataType = "Long"),

    })
    @RequestMapping(value = "/findKindByKindId",method = RequestMethod.GET)
    public  ResultInfo findKindByKindId(Integer id){
        return   homePageService.findKindByKindId(id);
    }



    /**
     * 百科详情 文章
     * @param kindId
     * @return
     */
    @ApiOperation(value = "百科详情 文章",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "kindId", value = "kindId", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageNum", value = "页数", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),

    })
    @RequestMapping(value = "/findKindByArticle",method = RequestMethod.GET)
    public  ResultInfo  findKindByArticle(Integer kindId,Integer pageNum,Integer pageSize){
        return   homePageService.findKindByArticle(kindId,pageNum,pageSize);
    }
    /**
     * 百科详情 圈子帖子
     * @param kindId
     * @return
     */
    @ApiOperation(value = "百科详情 圈子帖子",notes=" ")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "kindId", value = "kindId", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageNum", value = "页数", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),
    })
    @RequestMapping(value = "/findKindByCircleArticle",method = RequestMethod.GET)
    public  ResultInfo  findKindByCircleArticle(Integer kindId,Integer pageNum,Integer pageSize){
        return   homePageService.findKindByCircleArticle(kindId,pageNum,pageSize);
    }



    /**
     * 大家都在看
     * @param pageNum
     * @param pageSize
     * @return
     */
    @ApiOperation(value = "大家都在看",notes="")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "articleId", value = "文章Id", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "Long"),
            @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, dataType = "Long"),

    })
    @RequestMapping(value = "/recommendArticle",method= RequestMethod.GET)
    public ResultInfo  recommendArticle(Integer pageNum,Integer pageSize,Integer articleId){
        return   homePageService.recommendArticle(pageNum,pageSize,articleId);
    }




}
